package Administrator.AdministratorMainFrame.AdministratorMainFrameView.ConfigureContestPane.ConfigureLanguageFrame;

import java.awt.EventQueue;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.UIManager;

public class AddLanguageFrame {

	private JFormattedTextField programExecutionCmdLineFormattedTextField;
	private JFormattedTextField compileCmdLineFormattedTextField;
	private JFormattedTextField executableFileNameFormattedTextField;
	private JComboBox addWhichLanguageComboBox;
	private JFormattedTextField displayNameFormattedTextField;
	private JFrame frame;

	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					AddLanguageFrame window = new AddLanguageFrame();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application
	 */
	public AddLanguageFrame() 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		createContents();
	}

	/**
	 * Initialize the contents of the frame
	 */
	private void createContents() {
		frame = new JFrame();
		frame.getContentPane().setLayout(null);
		frame.setTitle("Add New Language");
		frame.setBounds(100, 100, 500, 375);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		final JLabel addWhichLanguageLabel = new JLabel();
		addWhichLanguageLabel.setText("Add Which Language");
		addWhichLanguageLabel.setBounds(56, 58, 114, 18);
		frame.getContentPane().add(addWhichLanguageLabel);

		final JLabel dispalyNameLabel = new JLabel();
		dispalyNameLabel.setText("Display Name");
		dispalyNameLabel.setBounds(56, 107, 114, 15);
		frame.getContentPane().add(dispalyNameLabel);

		displayNameFormattedTextField = new JFormattedTextField();
		displayNameFormattedTextField.setBounds(186, 104, 210, 21);
		frame.getContentPane().add(displayNameFormattedTextField);

		addWhichLanguageComboBox = new JComboBox();
		addWhichLanguageComboBox.setBounds(187, 57, 209, 21);
		frame.getContentPane().add(addWhichLanguageComboBox);

		final JLabel complierLabel = new JLabel();
		complierLabel.setText("Compile Cmd Line");
		complierLabel.setBounds(56, 164, 101, 15);
		frame.getContentPane().add(complierLabel);

		final JLabel exLabel = new JLabel();
		exLabel.setText("Executable FileName");
		exLabel.setBounds(56, 217, 114, 15);
		frame.getContentPane().add(exLabel);

		executableFileNameFormattedTextField = new JFormattedTextField();
		executableFileNameFormattedTextField.setBounds(186, 214, 210, 21);
		frame.getContentPane().add(executableFileNameFormattedTextField);

		compileCmdLineFormattedTextField = new JFormattedTextField();
		compileCmdLineFormattedTextField.setBounds(186, 161, 210, 21);
		frame.getContentPane().add(compileCmdLineFormattedTextField);

		final JLabel programLabel = new JLabel();
		programLabel.setText("Program Execution Cmd Line");
		programLabel.setBounds(10, 277, 160, 15);
		frame.getContentPane().add(programLabel);

		programExecutionCmdLineFormattedTextField = new JFormattedTextField();
		programExecutionCmdLineFormattedTextField.setBounds(186, 274, 210, 21);
		frame.getContentPane().add(programExecutionCmdLineFormattedTextField);

		final JButton addButton = new JButton();
		addButton.setText("Add");
		addButton.setBounds(185, 310, 66, 23);
		frame.getContentPane().add(addButton);

		final JButton exitButton = new JButton();
		exitButton.setText("Exit");
		exitButton.setBounds(330, 310, 66, 23);
		frame.getContentPane().add(exitButton);
	}

}
